/*
 * @Author: dongxueting
 * @Date: 2023-08-30 17:41:28
 * @LastEditTime: 2023-10-25 16:56:39
 * @email: dong_xt@reachauto.com
 * @Description: 
 */
import axios from "axios";
const instance = axios.create({
	// baseURL: 'http://123.57.6.189:9554',
	baseURL: process.env.NODE_ENV === "production" ? process.env.VUE_APP_API : 'http://127.0.0.1:3000',
	timeout: 100000,
	headers: {
		'Content-Type': 'application/json',
	}
})
export const getSignalList = () => {
	return instance.get("/platform/a/monitor/tripreport/getRealTimeDataFilterTest")
}

export const getGraphData = params => {
	return instance.get("/platform/a/monitor/tripreport/getRepaortDataEx", { params })
}

export const getBottomData = params => {
  return instance.get("/platform/a/monitor/tripreport/getRepaortDataBottom", { params })
}

export const exportData = params => {
	return instance.get("http://123.57.6.189:9554/platform/a/monitor/tripreport/getRepaortDataFile", { params })
}

export const saveSetting = data => {
	return instance.post("/platform/a/monitor/tripreport/savesetting", data, {
		headers: {
			'Content-Type': 'multipart/form-data'
		}
	})
}

export const getSetting = () => {
	return instance.get("/platform/a/monitor/tripreport/getsetting")
}
